import { ReactElement, useCallback } from "react";
import { Input } from "../BUI";

interface IProps {}

const Title = ({ changeTitle }): ReactElement => {
  const handleChangeTitle = useCallback(
    ({ detail: { value } }) => {
      changeTitle(value);
    },
    [changeTitle]
  );

  return <Input label='标题' onInput={handleChangeTitle} />;
};

export default Title;
